package com.bulemobi.activity.ac_userCentre_Setting;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.TextView;
import com.bulemobi.net.tsz.afinal.annotation.view.ViewInject;
import com.bulemobi.view.BaseActivity;
import com.bulemobi.view.titleView.ActionBarView;
import com.jsyh.hcb.R;

/***
 * 
 * @author zengys   输入新交易密码
 * 
 * 
 * 2014年9月22日 19:45:40
 * 
 * */
public class Ac_Input_trade_newPwd extends BaseActivity implements OnClickListener{
	@ViewInject(id = R.id.tv_confirm)
    TextView tv_confirm;
    @ViewInject(id = R.id.ed_firstPassWord)
    EditText ed_firstPassWord;
    @ViewInject(id = R.id.ed_secondPassWord)
    EditText ed_secondPassWord;
    @ViewInject(id = R.id.actionBar)
    ActionBarView actionBarView;
	 @Override
     protected void onCreate(Bundle savedInstanceState) {
    	// TODO Auto-generated method stub
    	super.onCreate(savedInstanceState);
    	setContentView(R.layout.ac_input_trade_new_pwd);
    	 initView();
    	
    }
	 private void initView(){
	        actionBarView.title.setText(getResources().getString(R.string.ac_input_treade_pwd));
	        tv_confirm.setOnClickListener(this);
	    }
	
	
	@Override
	public void onClick(View v) {
           switch (v.getId()) {
		case R.id.tv_confirm:
			
			if(ed_firstPassWord.getText().length()<8){
                showToastShort(getResources().getString(R.string.error_treade_pwd));
                return;
            }else if(!ed_secondPassWord.getText().toString().equals(ed_firstPassWord.getText().toString())){
                showToastShort(getResources().getString(R.string.error_agian_require));
                return;
            }else{
            	openActivity(Ac_Setting_up.class);
                finish();
            }
			break;

		default:
			break;
		}		
	}

}
